package com.chuantou.yuba.api.to;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class FishingFriendTO implements Parcelable {
	// 用户ID
	@SerializedName("uid")
	private long uid;
	// 个性签名
	@SerializedName("mood")
	private String mood;
	// 头像
	@SerializedName("avatar")
	private String avatar;
	// 昵称
	@SerializedName("username")
	private String nickname;
	// 生日
	@SerializedName("birthday")
	private String birthday;
	// 性别
	@SerializedName("sex")
	private int sex;
	// 距离
	@SerializedName("distance")
	private double distance;

	// 是否已关注，1为已关注，0为未关注
	@SerializedName("followed")
	private int followed;

	public FishingFriendTO() {
	}

	public FishingFriendTO(Parcel source) {
		// TODO 需要序列化时再做
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO 需要序列化时再做
	}

	public boolean isFollowed(){
		return followed == 1;
	}
	
	public void setFollowed(boolean followed){
		this.followed = followed ? 1 : 0;
	}
	
	public static final Creator<FishingFriendTO> CREATOR = new Creator<FishingFriendTO>() {

		@Override
		public FishingFriendTO[] newArray(int size) {
			return new FishingFriendTO[size];
		}

		@Override
		public FishingFriendTO createFromParcel(Parcel source) {
			return new FishingFriendTO(source);
		}
	};

	public long getUid() {
		return uid;
	}

	public void setUid(long uid) {
		this.uid = uid;
	}

	public String getMood() {
		return mood;
	}

	public void setMood(String mood) {
		this.mood = mood;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

	public int getFollowed() {
		return followed;
	}

	public void setFollowed(int followed) {
		this.followed = followed;
	}

}
